#include "buzzer.h"

u8 buzzer_active_flag = 0;
int buzzer_active_time = 0; 

void BUZZER_Init(void)
{
    BUZZER_PIN = 0;

	P3M0 |= 0xC0; //P37, P36strong
	P3M1 &= (~0xC0);
}

void BUZZER_Active(u16 time)
{
    buzzer_active_flag = 1;
    buzzer_active_time = time;
}

void BUZZER_Status(u8 sta)
{
    if(sta)
    {
        BUZZER_PIN = 0; 
    }
    else
    {
        BUZZER_PIN = 1;
    }
}

void BUZZER_Toggle()
{
    BUZZER_PIN = ~BUZZER_PIN;
}
